// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

.contest-voting-list {
  &__table {
    width: 100%;
    max-width: (600px + 40px);
    padding: 20px;
    margin: 0 auto;
  }

  &__rank {
    display: flex;
    align-items: center;
    flex: 0 0 32px;
    font-weight: 100;
    justify-content: center;
    background: @osu-colour-b6;

    &--blank {
      background-color: transparent;
    }
  }

  &__trophy {
    &--1 {
      color: gold;
    }
    &--2 {
      color: silver;
    }
    &--3 {
      color: chocolate;
    }
  }

  &__row {
    background-color: @osu-colour-b4;
    color: @osu-colour-f1;
    font-size: 12px;
    border-bottom: 2px solid @osu-colour-b6;
    transition: 0.1s;
    display: flex;

    &:hover {
      background-color: @osu-colour-b3;
    }

    &--selected {
      background-color: @osu-colour-b3;
    }

    &:first-child {
      border-radius: @border-radius-base @border-radius-base 0 0;
      overflow: hidden;
    }

    &:last-child {
      border-bottom: none;
      border-radius: 0 0 @border-radius-base @border-radius-base;
      overflow: hidden;
    }
  }

  &__header {
    text-transform: uppercase;
    color: @osu-colour-f1;
    font-size: 10px;
    line-height: 32px;
    display: flex;
  }

  &__header-wrapper {
    display: flex;
    width: 100%;
  }

  &__icon {
    flex: 0 0 32px;
    display: flex;
    .center-content();
    &--bg {
      background: rgba(0, 0, 0, 0.75);
    }
    &--judge-results {
      background-color: @osu-colour-b6;
    }
    &--submitted-beatmaps {
      background-size: cover;
      flex: 0 0 50px;
    }
  }

  &__header-title {
    padding-left: 10px;
    margin-right: auto;
  }

  &__header-voted-toggle-button {
    align-self: center;
  }

  &__header-votesummary {
    display: flex;
    align-items: center;
  }

  &__preview {
    .center-content();
    background: black;
  }

  &__title {
    .content-font();

    color: white;
    padding: (10px - 2px);
    transform: translate(0);
    overflow: hidden;

    &--show-votes {
      width: 100%;
      padding: 2px 10px;
    }
  }

  &__title-link {
    .link-white();
    display: block;
  }

  &__votes-bar {
    position: absolute;
    height: 100%;
    background-color: @osu-colour-b2;
    top: 0;
    left: 0;
  }

  &__entrant {
    font-size: 10px;
    position: relative;
  }

  &__link {
    .link-white();
    .link-plain();

    &--shadowed {
      .default-text-shadow();
    }
  }
}
